#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
#include <stdlib.h>
#include <time.h>


int main()
{
	srand((unsigned int)time(NULL));
	int arr[520] = { 0 };
	for (int i = 0; i < 520; i++)
	{
		int ret = rand() % 520 + 1;
		arr[i] = ret;
	}
	
	int newarr[520] = { 0 };
	int count = 0;
	for (int i = 0; i < 520; i++)
	{
		if (arr[i] % 2 != 0)
		{
			newarr[count++] = arr[i];
		}
	}

	for (int i = 0; i < 520; i++)
	{
		if (arr[i] % 2 == 0)
		{
			newarr[count++] = arr[i];
		}
	}

	for (int i = 0; i < 520; i++)
	{

		printf("%3d ", newarr[i]);
		if (newarr[i] == 520)
		{
			printf("\n");
			printf("       *             *       \n");
			printf("     *                 *     \n");
			printf("    *     5    2    0    *   \n ");
			printf("    *        love       *   \n");
			printf("      *                *     \n");
			printf("        *            *       \n");
			printf("          *        *         \n");
			printf("             *   *           \n");
			printf("               *             \n");
			printf("\n");
		}
		if ((i + 1) % 6 == 0)
		{
			printf("\n");
		}
	}
	return 0;
}


